f9c75892210fcb6da7f30cf5b919073fa73834c9,framework/service/src/org/ofbiz/service/test/ServiceEngineTestServices.java,ServiceEngineTestServices,testServiceLockWaitTimeoutRetry,#DispatchContext#Map#,105
Before Change
public static Map testServiceLockWaitTimeoutRetry(DispatchContext dctx, Map context) {
LocalDispatcher dispatcher = dctx.getDispatcher();
try {
dispatcher.runAsync("testServiceDeadLockRetryThreadA", null, false);
dispatcher.runAsync("testServiceDeadLockRetryThreadB", null, false);
} catch (GenericServiceException e) {
String errMsg = "Error running deadlock test services: " + e.toString();
After Change
LocalDispatcher dispatcher = dctx.getDispatcher();
try {
// NOTE using persist=false so that the lock retry will have to fix the problem instead of the job poller picking it up again
GenericResultWaiter grabberWaiter = dispatcher.runAsyncWait("testServiceLockWaitTimeoutRetryGrabber", null, false);
GenericResultWaiter waiterWaiter = dispatcher.runAsyncWait("testServiceLockWaitTimeoutRetryWaiter", null, false);
// make sure to wait for these to both finish to make sure results aren't checked until they are done
grabberWaiter.waitForResult();
waiterWaiter.waitForResult();
} catch (Exception e) {
String errMsg = "Error running deadlock test services: " + e.toString();